<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理页面</title>
<link href="{webroot}theme/admin/css/iframe.css" rel="stylesheet" type="text/css" />
<link href="{webroot}theme/admin/css/iconfont.css" rel="stylesheet" type="text/css" />
<script src="{webroot}lib/js/jquery.js"></script>
<script src="{webroot}lib/js/jquery-migrate-1.1.0.min.js"></script>
<script src="{webroot}lib/tips/jquery.tips.js"></script>
<script src="{webroot}lib/validator/jquery.validator.js"></script>
<script src="{webroot}lib/validator/zh_CN.js"></script>
<script src="{webroot}theme/admin/js/admin.js"></script>
<script src="{webroot}lib/dialog/artdialog.js"></script>
<!--[if lt IE 9]>
<script src="{webroot}lib/js/html5.js"></script>
<![endif]-->
<script>
$(function(){
	$(".del").click(function(){
		var id;
		id=$(this).attr("rel");
			top.dialog({
				content:'\u786e\u5b9a\u8981\u5220\u9664\uff1f\u4e0d\u53ef\u6062\u590d\uff01',
				ok:function(){
					var url,data;
					url='?act=delgroup&id='+id;
					$.ajax({
					type:"get",
					cache:false,
					url:url,
					data:"",
					success:function(_)
					{
						var act=_.substring(0,1);
						var info=_.substring(1);
						switch(act)
						{
							case "0":
								$.fn.tips({type:'error',content:info})
								break;
							case "1":
								$.fn.tips({type:'ok',content:'\u5220\u9664\u6210\u529f'})
								$("#group_"+id).fadeOut('slow');
								break;
							default:
								alert(_);
								break;
						}
					}
					});
									
					},
				cancel:true 
			}).showModal();
		
		})
	
})
</script>
</head>
<body>

<div class="layout-center">
	<div class="right_subject">当前位置：设置 > <a href="?act=group">角色管理</a></div>
    <div class="right_body">
        <div class="nav_menu">
            <ul>
                <li><a href="?act=addgroup"><span class="iconfont">&#xe618;</span>添加角色</a></li>
            </ul>
        </div>
        
        <div class="table_title">
        角色列表
        </div>
        <table id="tablelist">
            <thead>
                <tr>
                    <th width="60">ID</th>
                    <th width="150">角色名称</th>
                    <th>角色描述</th>
                    <th width="150">创建日期</th>
                    <th width="250">管理</th>
                </tr>
            </thead>
            <tbody>
            {sdcms:rs top="0" table="sd_admin_group" order="id desc"}
            <tr id="group_{$rs[id]}">
                <td align="center">{$rs[id]}</td>
                <td>{$rs[groupname]}</td>
                <td>{$rs[groupdesc]}</td>
                <td align="center">{$rs[createdate]}</td>
                <td align="center"><a href="?act=editlever&id={$rs[id]}">页面权限</a>　<a href="?act=editcate&id={$rs[id]}">栏目权限</a>　<a href="?act=list&id={$rs[id]}">成员管理</a>　<a href="?act=editgroup&id={$rs[id]}">编辑</a>　<a href="javascript:;" class="del" rel="{$rs[id]}">删除</a></td>
            </tr>
            {/sdcms:rs}
            </tbody>
        </table>
    </div>
</div>
</body>
</html>